package com.timber.util;

import java.io.Serializable;
import java.sql.Date;
import java.sql.ResultSet;
import java.sql.SQLException;

public class InvetoryBean extends SLDataObjectAdaptor implements Serializable {
	
    String ITEMID  = "ItemId";
	String TIMBERNAME= "TimberName";
	String TCLASS="TClass"	  ;
	String LENGHT="Lenght";
	String WIDTH ="Width";
	String PQUANTITY= "PQuantity";
	String SQUANTITY ="SQuantity";
	String PURCHASEDATE="PurchaseDate";
	String PURCHASERATE="PurchaseRate";
	String SALESRATE ="SalesRate";
	String SUPPLIERID ="SupplierId";
	String LOTID ="LotId";
	String CHILDID= "ChildId";
	
	
	//bean 
	String   ItemId  ;   
	String timberName; 
	String tClass	;  
	double lenght; 
	double width ;
	double pQuantity; 
	double sQuantity ;
	Date purchaseDate ;
	double purchaseRate ;
	double salesRate; 
	int supplierId ;
	int lotId ;
	int childId ;
	public int getChildId() {
		return childId;
	}
	public void setChildId(int childId) {
		this.childId = childId;
	}
	public String getItemId() {
		return ItemId;
	}
	public void setItemId(String itemId) {
		this.ItemId = itemId;
	}
	public double getLenght() {
		return lenght;
	}
	public void setLenght(double lenght) {
		this.lenght = lenght;
	}
	public int getLotId() {
		return lotId;
	}
	public void setLotId(int lotId) {
		this.lotId = lotId;
	}
	public double getPQuantity() {
		return pQuantity;
	}
	public void setPQuantity(double quantity) {
		pQuantity = quantity;
	}
	public Date getPurchaseDate() {
		return purchaseDate;
	}
	public void setPurchaseDate(Date purchaseDate) {
		this.purchaseDate = purchaseDate;
	}
	public double getPurchaseRate() {
		return purchaseRate;
	}
	public void setPurchaseRate(double purchaseRate) {
		this.purchaseRate = purchaseRate;
	}
	public double getSalesRate() {
		return salesRate;
	}
	public void setSalesRate(double salesRate) {
		this.salesRate = salesRate;
	}
	public double getSQuantity() {
		return sQuantity;
	}
	public void setSQuantity(double quantity) {
		sQuantity = quantity;
	}
	public int getSupplierId() {
		return supplierId;
	}
	public void setSupplierId(int supplierId) {
		this.supplierId = supplierId;
	}
	public String getTClass() {
		return tClass;
	}
	public void setTClass(String class1) {
		tClass = class1;
	}
	public String getTimberName() {
		return timberName;
	}
	public void setTimberName(String timberName) {
		this.timberName = timberName;
	}
	public double getWidth() {
		return width;
	}
	public void setWidth(double width) {
		this.width = width;
	}
	
	
	
	public boolean load(ResultSet rs) throws SQLException
	{

		ItemId=rs.getString(ITEMID);     
		 timberName=rs.getString(TIMBERNAME); 
		 tClass	=rs.getString(TCLASS);   
		 lenght =rs.getDouble(LENGHT);
		 width =rs.getDouble(WIDTH);
		 pQuantity =rs.getDouble(PQUANTITY);
		 sQuantity =rs.getDouble(SQUANTITY);
		 purchaseDate =rs.getDate(PURCHASEDATE);
		 purchaseRate =rs.getDouble(PURCHASERATE);
		 salesRate = rs.getDouble(SALESRATE);
		 supplierId =rs.getInt(SUPPLIERID);  
		 lotId =rs.getInt(LOTID);  
		 childId =rs.getInt(CHILDID);  
		
		
		return true;
	}

}
